<?php
session_start();
require_once('../include/connect.inc.php');
if($_SESSION['sess_id'] <> session_id()){
?>
 <SCRIPT LANGUAGE="JavaScript">
			alert("กรุณาเข้าสู่ระบบให้ถูกต้องตามขั้นตอน...!");
			location="login.php";
</script>
<?php }?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Modeltests Program</title>
</head>

<body>
<table width="771" border="1">
  <tr>
    <td width="49" height="38">ลำดับที่</td>
    <td width="175">วิชา</td>
    <td width="168">หัวข้อสอบ</td>
    <td width="168">วันที่ทำข้อสอบ</td>
    <td width="177">ตรวจสอบคะแนน</td>
  </tr>
  <?php
   $number=0;
  $query = query("SELECT * FROM tb_dotest  where student_id=1");
		while ($rs = fetch_array($query)) {
			$dotest_id= $rs['dotest_id'];
			$date_test= $rs['date_test'];
			$number++;
  ?>
  <tr>
    <td align="center"><? echo $number; ?></td>
    <td></td>
    <td>&nbsp;</td>
    <td><? echo $date_test;?></td>
    <td><a href="score.php?dotest_id=<? echo $dotest_id?>"><img src="../images/s.png" alt="" border="0" /></a><? echo $dotest_id?></td>
  </tr>
  <? }?>
</table>
</body>
</html>
